package com.xtianzhuang.www.shiro;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.shiro.web.filter.AccessControlFilter;

/**
 * 强制退出会话过滤器
 */
public class SessionForceLogoutFilter extends AccessControlFilter {
	protected final Log logger = LogFactory.getLog(getClass());
	@Override
	protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)
			throws Exception {
		// TODO Auto-generated method stub
		logger.error("###############有访问权限############");
		return true;
	}

	@Override
	protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		logger.error("###############无访问权限############");
		return false;
	}


}
